package com.study.o2o.enums;

public enum HeadLineStateEnum {
	SUCCESS(0,"创建成功"),INNER_ERROR(-1001, "操作失败"), EMPTY(-1002, "头条信息为空");
	private int state;
	
	private String stateInfo;
	
	private HeadLineStateEnum(int state,String stateInfo) {
		this.state = state;
		this.stateInfo = stateInfo;
	}
	
	public int getState() {
		return state;
	}
	
	public String getStateInfo() {
		return stateInfo;
	}
	
	public static HeadLineStateEnum stateOf(int index) {
		for(HeadLineStateEnum state : values()) {
			return state;
		}
		return null;
	}
}
